import sqlite3

with sqlite3.connect("library.db") as conn:
    cursor=conn.cursor()
    sql1="UPDATE books SET status=? WHERE title=? "
    cursor.execute(sql1,('Check Out','1984'))
    sql2="SELECT title FROM books where publication_year >=2000"
    cursor.execute(sql2)
    for i in cursor.fetchall():
        print(i[0])
    sql3="DELETE FROM books where title=? "
    cursor.execute(sql3 ,('The Great Gatsby',))
    cursor.execute("SELECT * FROM books ORDER BY publication_year DESC")
    for i in cursor.fetchall():
        print(i)